import com.yan.Students;
import com.yan.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {
//    public static void main(String[] args) {
//      ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
//        Students students = (Students) context.getBean("students");
//        System.out.println(students.toString());
//
//    }


    @Test
    public void tese2() {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean01.xml");
        User user = context.getBean("user1", User.class);
        User user1 = context.getBean("user1", User.class);
        System.out.println(user==user1);
        System.out.println(user);

    }
}
